package com.bohua.intermediary.controller;

import com.bohua.intermediary.common.Lay;
import com.bohua.intermediary.common.Msg;
import com.bohua.intermediary.entity.SysHouseInfo;
import com.bohua.intermediary.service.SysHouseInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
/**
 * 控制器
 * @author qian
 * @email 1415261159@qq.com
 * @date 2019/01/19
 */
@Controller
@RequestMapping("/sysHouseInfo")
public class SysHouseInfoController {
    @Resource
    private SysHouseInfoService sysHouseInfoService;

    @RequestMapping
    public String sysHouseInfo(){
        return "sysHouseInfo/sysHouseInfo";
    }
    @RequestMapping("/add")
    public String add(){
        return "sysHouseInfo/addSysHouseInfo";
    }

    @RequestMapping("/update")
    public String update(){
        return "sysHouseInfo/updateSysHouseInfo";
    }

    @RequestMapping("/getSysHouseInfos")
    @ResponseBody
    public Lay getSysHouseInfos(SysHouseInfo sysHouseInfo,Integer page,Integer limit){
        return sysHouseInfoService.getSysHouseInfos(sysHouseInfo,page,limit);
    }
    @RequestMapping("/addSysHouseInfo")
    @ResponseBody
    public Msg addSysHouseInfo(SysHouseInfo sysHouseInfo){
        return sysHouseInfoService.addSysHouseInfo(sysHouseInfo);
    }

    @RequestMapping("/updateSysHouseInfo")
    @ResponseBody
    public Msg updateSysHouseInfo(SysHouseInfo sysHouseInfo){
        return sysHouseInfoService.updateSysHouseInfo(sysHouseInfo);
    }

    @RequestMapping("/delSysHouseInfo")
    @ResponseBody
    public Msg delSysHouseInfo(SysHouseInfo sysHouseInfo){
        return sysHouseInfoService.delSysHouseInfo(sysHouseInfo);
    }
}
